﻿<UserControl x:Class="API_SampleBook_Silverlight.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
			 MinHeight="400" MinWidth="640"
    d:DesignHeight="400" d:DesignWidth="640" xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" Loaded="UserControl_Loaded">
	<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource ServiceDataSampleDataSource}}">
		<Grid.Background>
			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="White" Offset="0" />
				<GradientStop Color="#FFCBCBCB" Offset="1" />
			</LinearGradientBrush>
		</Grid.Background>
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="150*" />
				<ColumnDefinition Width="389*" />
				<ColumnDefinition Width="60" />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="26" />
				<RowDefinition Height="1*" />
				<RowDefinition Height="2*" />
				<RowDefinition Height="20" />
			</Grid.RowDefinitions>
			<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="13" FontWeight="Bold">Seoul Open API Test</TextBlock>
			<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
				<TextBlock VerticalAlignment="Center" Margin="5,0">ID</TextBlock>
				<TextBox Name="textBoxName" Width="120" />
				<TextBlock VerticalAlignment="Center" Margin="5,0">|</TextBlock>
				<TextBlock VerticalAlignment="Center" Margin="0,0,5,0">Key</TextBlock>
				<TextBox Name="textBoxKey" Width="150" />
			</StackPanel>
			<controls:TreeView Name="treeServiceItem" Grid.Row="1" Grid.RowSpan="2" BorderBrush="{x:Null}" SelectedItemChanged="treeServiceItem_SelectedItemChanged">
				<sdk:TreeView.ItemTemplate>
					<sdk:HierarchicalDataTemplate ItemsSource="{Binding Items}">
						<TextBlock Margin="0" Text="{Binding Description, Mode=OneWay}" FontSize="12">
							<ToolTipService.ToolTip>
								<StackPanel Orientation="Vertical" Margin="3">
									<StackPanel Orientation="Horizontal">
						<TextBlock Margin="0" Text="서비스명: " />
						<TextBlock Margin="0" Text="{Binding Name, Mode=OneWay}" />
									</StackPanel>
									<StackPanel Orientation="Horizontal">
						<TextBlock Margin="0" Text="필요인자갯수: " />
						<TextBlock Margin="0" Text="{Binding Required, Mode=OneWay}" />
						<TextBlock Margin="0" Text="개" />
									</StackPanel>
									<StackPanel Orientation="Horizontal">
						<TextBlock Margin="0" Text="선택인자갯수: " />
						<TextBlock Margin="0" Text="{Binding Optional, Mode=OneWay}" />
						<TextBlock Margin="0" Text="개" />
									</StackPanel>
								</StackPanel>
							</ToolTipService.ToolTip>
						</TextBlock>
					</sdk:HierarchicalDataTemplate>
				</sdk:TreeView.ItemTemplate>
			</controls:TreeView>
			<Grid Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1">
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition Height="20" />
						<RowDefinition Height="*" />
					</Grid.RowDefinitions>
					<StackPanel Orientation="Horizontal">
						<TextBlock Margin="3">필요인자 입력 (엔터로 구분) ...</TextBlock>
						<TextBlock Margin="5,3" Foreground="DarkRed" Name="infoTextBlock"></TextBlock>
					</StackPanel>
					<TextBox Name="textBoxInput" Grid.Row="1" AcceptsReturn="True" />
				</Grid>
			</Grid>
			<sdk:GridSplitter Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Height="10" Name="gridSplitter1" VerticalAlignment="Bottom" ShowsPreview="True" HorizontalAlignment="Stretch" Background="Silver" />
			<Grid Grid.Row="2" Grid.Column="1">
				<TextBox Name="textBoxOutput" AcceptsReturn="True" IsReadOnly="True" Margin="3" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />
			</Grid>
			<Button Name="buttonResult" Grid.Row="2" Grid.Column="2" Content="결과확인" Margin="3" Click="buttonResult_Click" Width="50" Height="50" />
			<sdk:Label Grid.Row="3" VerticalAlignment="Center" Grid.ColumnSpan="3" HorizontalAlignment="Center" Content="주의: Silverlight에서는 반드시 OOB(Out-Of-Browser)로 실행해야 함! (우클릭>설치)" Foreground="DarkRed" FontWeight="Bold" FontSize="12" />
		</Grid>
	</Grid>
</UserControl>
